home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / prtr1_2.zip / PRTR / DEMO2 / 0009.PR < prev    next >
Text File  |  1994-08-27  |  447b  |  34 lines

  1. $DESCRIPTION:
  2. Version: 4.135
  3.  
  4. The scope resolusion operator is not resolving scope as it should. Consider the following code.
  5.  
  6. int a;
  7.  
  8. main()
  9. {
  10.   int a;
  11.   a = 3;
  12.   ::a = 2;
  13.   cout << "local a = " << a << "\n"
  14.   cout << "global a = " << ::a << "\n"
  15. }
  16.  
  17. The code results in the output:
  18.  
  19.   local a = 2
  20.   global a = 2
  21.  
  22. The output should be
  23.  
  24.   local a = 3
  25.   global a = 2
  26.  
  27.  
  28. $INVESTIGATION:
  29.  
  30. $RESOLUTION:
  31.  
  32. $VERIFICATION:
  33.  
  34.